#ifndef _DICTIONNARY_I_H
#define	_DICTIONNARY_I_H


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string>
#include <fstream>
#include <sstream>
#include <list>
#include "Dictionnary.hh"
#include "Word_i.h"
#include "Entity_i.h"


using namespace std;
using namespace Dict; 

class Dictionnary_i: public POA_Dict::Dictionnary,
	             public PortableServer::RefCountServantBase 
{
   //private:
     public:
	//Entity_i entity;
	static list<Entity_i> listEntity;// = new ArrayList();
	static int index; 
	static char* FILE_ENTRY;
	static char* FILE_DEF;
   	
	//const char FILE_ENTRY = "./entries.dat"; //le fichier etrée
    	//const char FILE_DEF = "./defs.dat";//stocke les définitions

	inline Dictionnary_i(){}
	virtual ~Dictionnary_i(); 	
	
	//virtual Entity_ptr search(char* term);	

	virtual void addEntity(const char* term, CategoryValue cat, const PropertyType& props, const char* def)throw (TermExisted, CategoryAndPropsNotMatch);
    	virtual void delEntity(const char* term)throw (TermNotFound);
    	virtual void modifDefinition(const char* term, const char* newdef)throw (TermNotFound);
    	virtual Entity_ptr findEntity(const char* term)throw (TermNotFound);
    	virtual void sortDict(::CORBA::Boolean dir);
    	virtual ::CORBA::Long loadDict()throw (DicFileNotFound);
    	virtual void saveDict();
    	virtual ::CORBA::Long dictLength();
    	virtual Entity_ptr firstEntity() throw (DictEmpty);
    	virtual Entity_ptr lastEntity()throw (DictEmpty);
    	virtual Entity_ptr nextEntity()throw (DictEmpty);
    	virtual Entity_ptr prevEntity()throw (DictEmpty);
	
};
#endif	/* _DICTIONNARY_I_H */















